package com.network;

import java.io.DataInputStream;
import java.net.Socket;

public class ClientReceive extends Thread{
    private  Socket socket;
    ClientReceive(Socket socket){
        this.socket = socket;
    }
    public void run(){
        try(
                DataInputStream dataInputStream = new DataInputStream(socket.getInputStream()))
        {
            while(true) {
                try {
                    System.out.println(dataInputStream.readUTF());
                }catch (Exception s){

                    break;
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
